package org.brisling.task.service;



import org.brisling.common.SysConfig;
import org.brisling.duties.service.DutiesInquiryService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class dutiesScheduledService {
	private static Logger logger = LoggerFactory.getLogger(ScheduledService.class);
	// @Scheduled(cron="0/5 * *  * * ? ")   //每5秒执行一次  

	@Autowired
	private DutiesInquiryService autocarry;
	

	
	@Scheduled(cron="0 35 1  1 * ? ")
	public void antiDoseCount(){
		//禁用日志
		SysConfig.setEnableLog(false);
		System.out.println("\n\n\nhaha, got one autocarry\n\n\n");
		autocarry.countAndInsert();
		System.out.println("\n\n\nhaha, got one autocarry\n\n\n");
	}


}
